<template>
  <div class="hello">
    <h1>{{ msg }}+{{auth}}</h1>
  </div>
</template>

<script type="text/ecmascript-6">
export default {
  data () {
    return {
      // note: changing this line won't causes changes
      // with hot-reload because the reloaded component
      // preserves its current state and we are modifying
      // its initial state.
      msg: 'Hello World!'
    }
  },
  mounted() {

  },
  activated(){
  //对于需要刷新的组件，每次进入需要重载data
    setTimeout(()=>{
      this.msg='aaaaaaaaaaaaaa';
    },2000)

  },
  props:['auth']
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1 {
  color: #42b983;
}
</style>
